package com.sensePlusVR.activity.mine;

import android.view.View;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;

import com.sensePlusVR.base.BaseActivity;
import com.sensePlusVR.main.R;
import com.sensePlusVR.utils.AppManager;
import com.sensePlusVR.utils.MyLog;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;
import org.xutils.x;

/**
 * 
 * @author: Loren
 * @create: 2016-8-10下午2:44:35
 * @desc: 更换App icon
 *
 */
@SuppressWarnings("unused")
@ContentView(R.layout.activity_setting_core_replace_icon)
public class ReplaceIconActivity extends BaseActivity{
	
	private static final String TAG = ReplaceIconActivity.class.getSimpleName();
	@ViewInject(R.id.title_bar_title_tv)
	private TextView title_bar_title_tv;
	@ViewInject(R.id.radioGroup1)
	private RadioGroup radioGroup1;
	
	@Override
	public void setMyContentView() {
		x.view().inject(this);
		
	/*	radioGroup1.setOnCheckedChangeListener(new OnCheckedChangeListener() {
			
			@Override
			public void onCheckedChanged(RadioGroup group, int checkedId) {
				//int radioButtonId = group.getCheckedRadioButtonId();
				//RadioButton rb = (RadioButton) ReplaceIconActivity.this.findViewById(radioButtonId);
			}
		});*/
	}
	
	@Override
	public void initView() {
		super.initView();
		AppManager.getInstance().addActivity(this);
		title_bar_title_tv.setText(R.string.replace_app_icon);
	}
	
	@Event(value = R.id.radioGroup1,type = RadioGroup.OnCheckedChangeListener.class)
	private void setCheckChangedClick(RadioGroup group, int checkedId){
		int radioButtonId = group.getCheckedRadioButtonId();
		RadioButton rb = (RadioButton) ReplaceIconActivity.this.findViewById(radioButtonId);
		MyLog.d(TAG, "setCheckChangedClick...check id : " + radioButtonId);
		
	}
	
	@Event(value = {R.id.title_bar_left_ib})
	private void setViewOnClick(View view){
		switch (view.getId()) {
		case R.id.title_bar_left_ib:
			AppManager.getInstance().finishActivity(this);
			break;

		default:
			break;
		}
		
	}

}
